$primary-color: #409EFF;
$primary-background-color: #ecf5ff;

*, :after, :before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

.fa-icon{
  width: auto;
  height: 1em; /* 或任意其它字体大小相对值 */

  /* 要在 Safari 中正常工作，需要再引入如下两行代码 */
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}

.center-container{
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;

  .btn-bar{
    height: 45px;
    line-height: 45px;
    font-size: 18px;
    border-bottom: solid 2px #e4e7ed;
    text-align: right;
  }

  .el-main{
    padding: 0;
    position: relative;
  }
}

.components-list{
  padding: 8px 0;
  width: 100%;
  height: 100%;

  .widget-cate{
    padding: 8px 12px;
    font-size: 13px;
  }

  ul{
    position: relative;
    overflow: hidden;
    padding: 0 10px 10px;
    margin: 0;
  }

  .form-edit-widget-label{
    font-size: 12px;
    display: block;
    width: 48%;
    line-height: 26px;
    position: relative;
    float: left;
    left: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 1%;
    color: #333;
    border: 1px solid #F4F6FC;

    &:hover{
      color: $primary-color;
      border: 1px dashed $primary-color;
    }

    &>a{
      display: block;
      cursor: move;
      background: #F4F6FC;
      border: 1px solid #F4F6FC;

      .icon{
        margin-right: 6px;
        margin-left: 8px;
        font-size: 14px;
        display: inline-block;
        vertical-align: middle;
      }

      span{
        display: inline-block;
        vertical-align: middle;
      }
    }
  }
}

.widget-form-container{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  .widget-form-list{
    height: 100%;
    padding-bottom: 150px;

    .widget-view{
      padding: 5px 10px 18px;
      margin: 0;
      position: relative;
      border-left: 5px solid transparent;

      &.is_req{
        .el-form-item__label::before{
          content: '*';
          color: #f56c6c;
          margin-right: 4px;
        }
      }

      &:after{
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        display: block;
        z-index: 1001;
      }

      &:hover{
        background: $primary-background-color;
        border-left: 5px solid $primary-background-color;
      }

      &.active{
        border-left: 5px solid $primary-color;
        background: #b3d8ff;
      }
    }

    .widget-action-delete{
      position: absolute;
      right: 20px;
      bottom: -35px;
      z-index: 1009;
    }

    .widget-action-clone{
      position: absolute;
      right: 70px;
      bottom: -35px;
      z-index: 1009;
    }
  }

  .widget-grid{
    background: #F4F6FC;
    position: relative;
    border-left: 5px solid transparent;
    padding: 5px;
    margin: 0 !important;

    &.active{
      border-left: 5px solid $primary-color;
      background: #b3d8ff;
    }
  }

  .widget-grid-container{
    &.ghost{
      &::after{
        background: #fff;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        display: block;
        z-index: 10;
        content: '';
      }
    }
  }

  .ghost{
    background: #fff;
    border: 1px dashed $primary-color;
  
    &::after{
      background: #fff;
    }
  }
  
  li.ghost{
    height: 30px;
    list-style: none;
    font-size: 0;
  }
}



.widget-config-container{
  position: relative;

  .el-header{
    border-bottom: solid 2px #e4e7ed;
    padding: 0 5px;
  }

  .config-tab{
    height: 45px;
    line-height: 45px;
    display: inline-block;
    width: 145px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    cursor: pointer;

    &.active{
      border-bottom: solid 2px $primary-color;
    }
  }

  .config-content{
    padding: 10px;

    .el-form-item__label{
      padding: 0;
      font-weight: 500;
    }

    .el-form-item {
      border-bottom: solid 1px #e1e1e1;
      padding-bottom: 10px;
    }
  }

  .ghost{
    background: #fff;
    border: 1px dashed $primary-color;
  
    &::after{
      background: #fff;
      display: block;
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
  }
  
  ul{
    margin: 0;
    padding: 0;
  }
  
  li.ghost{
    list-style: none;
    font-size: 0;
    display: block;
    position: relative;
  }
}

